package org.dromara.exam.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.Getter;
import org.apache.ibatis.type.JdbcType;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.exam.domain.entity.ExamRepo;
import org.dromara.exam.domain.dto.TemplateCount;
import org.dromara.exam.domain.dto.TemplateTagCount;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;


/**
 * 题库视图对象 exam_question_set
 *
 * @author xiyin321
 * @date 2024-04-11
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = ExamRepo.class)
public class ExamRepoVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 题库ID
     */
    @ExcelProperty(value = "题库ID")
    private Long repoId;

    /**
     * 题库名称
     */
    @ExcelProperty(value = "题库名称")
    private String repoName;

    /**
     * 题库封面地址
     */
    private Long image;

    @Translation(type = TransConstant.OSS_ID_TO_URL)
    private Long imageUrl;

    /**
     * 共享标志
     */
    @ExcelProperty(value = "共享标志")
    private String shareFlag;

    /*
     * 题库标签名称
     * */
    @ExcelProperty(value = "标签")
    private String[] tag;

    /**
     * 题库总分
     */
    @ExcelProperty(value = "题库总分")
    private BigDecimal totalScore;

    /**
     * 备注信息
     */
    @ExcelProperty(value = "备注信息")
    private String remark;

    /**
     * 题型统计
     */
    @ExcelProperty(value = "题型统计")
    private TemplateCount templateCount;

    public void setImage(Long image) {
        this.image = image;
        this.imageUrl = image;
    }
}
